package com.banyuan;

import com.banyuan.Utils.JDBCUtils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class JDBCQueryTest {
    public static void main(String[] args) {
        ResultSet rs = null;
        try {
             rs = JDBCUtils.executeQuery("select * from person");
            while (rs.next()) {
                String username = rs.getString("username");
                System.out.println(username);
            }


        } catch (SQLException throwables) {
            throwables.printStackTrace();
        } finally {
         JDBCUtils.closeAllByRs(rs);
        }
    }
}
